//
//  YNXMPPManager.h
//  YNIMFramework
//
//  Created by 黄旭 on 2021/7/16.
//
//  配置xmpp流管理类

#import <Foundation/Foundation.h>
#import "YNXMPPprotocol.h"
#import "YNIMFrameworkTypedef.h"
@class XMPPStream;
@class PictureModel;
@class YNSLRoster;
@class YNGroupAndDiscussion;
@class YNMessagerReceiveHandle;

NS_ASSUME_NONNULL_BEGIN
@interface YNXMPPManager : NSObject
/**
 openfire是否已经掉线
 */
@property(nonatomic,assign)BOOL openfireIsOnline;

/// 开始xmpp
/// @param mini 是否是极简模式，极简模式为只使用聊天功能，其他如用户名册、群组功能都将不会开启
-(instancetype)initXMPPWithServer:(NSString*)server companyCode:(NSString*)code imId:(NSString*)imId loginName:(NSString*)loginName delegate:(id<YNXMPPprotocol>)delegate minimalist:(BOOL)mini;

//开始连接 返回错误信息描述，为空则为正确
- (NSString*)connectWithDomain:(NSString*)domain resource:(NSString*)resource;

//认证
-(void)xmppAuthenticatePassword:(NSString*)password;

//发送上线消息
- (void)goOnline;

//获取初始化信息
-(void)getLoginUserInfor;

-(XMPPStream*)getXMPPStream;

-(YNSLRoster*)getRoster;

-(YNGroupAndDiscussion*)getGroupHandle;

-(YNMessagerReceiveHandle*)getMessageHandle;
//获取Steam连接状态
- (XMPPConnectType)getXMPPConnectStatus;
//退出登录
- (void)logout;
///刷新xmpp连接，如果断开则执行重新登录
-(void)refreshXmppConnect;
///判断是否需要重新登录
- (BOOL)isNeedLoginAgain;
//获取初始化信息成功后，获取组织机构，群，讨论组等等信息.
- (void)fetchRosterData;

@end
NS_ASSUME_NONNULL_END
